<?php
/**
*
* @package MoltX QuickChat
* @author $Author: moltendorf $
* @version $Id: molten_chat_room.php 165 2009-09-26 00:44:33Z moltendorf $
* @latest $URL: http://molten-chat.googlecode.com/svn/trunk/source/molten_chat_room.php $
* @copyright (c) 2005-2009 Matthew Oltendorf
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
define('IN_PHPBB', true);
// Specify the path to you phpBB3 installation directory.
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
// The common.php file is required.
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);

$user->setup();

$template->assign_block_vars('navlinks', array(
	'FORUM_NAME' => $user->lang['MOLTEN_CHAT_SHOUTBOX'],
	'U_VIEW_FORUM' => append_sid($phpbb_root_path . 'molten_chat_room.' . $phpEx, 'build=' . $config['molten_chat_version'], false)
));

if ($auth->acl_get('u_molten_chat_user_send') or $auth->acl_get('u_molten_chat_user_view'))
{
	if (defined('molten_chat_enabled'))
	{
		// Output page
		page_header($user->lang['MOLTEN_CHAT_SHOUTBOX']);

		$template->assign_var('S_MOLTEN_CHAT_ROOM', true);

		$template->set_filenames(array(
			'body' => 'molten_chat_room.html'
		));

		page_footer();
	}
	else
	{
		trigger_error(sprintf($user->lang['MOLTEN_CHAT_DISABLED'], sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid($phpbb_root_path . 'index.' . $phpEx, false, true) . '">', '</a>')), E_USER_WARNING);
	}
}
else
{
	trigger_error(sprintf($user->lang['MOLTEN_CHAT_DISALLOWED'], sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid($phpbb_root_path . 'index.' . $phpEx, false, true) . '">', '</a>')), E_USER_WARNING);
}